package com.hyzx.qbasic.admin.domain.service;

import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.List;
import java.util.Map;

/**
 * Created by 黄江华 on 2018/8/21
 */

public interface IPoiService {
    void exportWordToFile(String templateFileUrl, Map<String, String> contentMap, File exportFile);

    void exportWordToResponse(String templateFileUrl, String fileName, Map<String, String> contentMap, HttpServletResponse response);

    HSSFWorkbook getWorkbook(String templateFileUrl);

    void exportExcelTitleRow(HSSFWorkbook workbook, int sheetIndex,List<String> titles, int offset);

    <T> void exportEntityToExcel(HSSFWorkbook workbook, int sheetIndex, List<String> cols, int offset, List<T> data);

    void exportMapToExcel(HSSFWorkbook workbook, int sheetIndex, List<String> cols, int offset, List<Map<String, Object>> data);

    void exportExcelToResponse(HSSFWorkbook workbook, String fileName,HttpServletResponse response);

}
